<template>
  <el-table
    v-loading="loading"
    v-bind="$attrs"
    :data="data"
    height="100%"
    :border="true"
    :highlight-current-row="true"
    empty-text="未查询到数据"
    v-on="$listeners"
  >
    <el-table-column type="index" width="80px" align="center" header-align="center" fixed="left" />
    <slot />
  </el-table>
</template>
<script>
export default {
  name: 'TableBlock',
  props: {
    loading: {
      type: Boolean,
      default: false
    },
    data: {
      type: Array,
      default: () => {
        return []
      }
    },
    currentRowKey: {
      type: String,
      default: 'id'
    },
    rowKey: {
      type: String,
      default: 'id'
    }
  }
}
</script>
